#pragma once
#include <cmath>
#include "mtxlib.h"

#define PI 3.14159f

class Quaternion
{
private:
	float x, y, z, w;
public:
	Quaternion() { x = y = z = 0.0f; w = 1.0f; }
	Quaternion(float X, float Y, float Z, float W) {
		x = X; y = Y; z = Z; w = W;
	}
	void	normalize();
	void	CreateFromAxisAngle(float X, float Y, float Z, float degree);
	void	CreateMatrix(float *pMatrix);
	void	CreateFromMatrix(float *pMatrix);
	void	QuatSlerp(Quaternion from, Quaternion to, float t);
	float	ToAngleByXAxis();

	static double delta;
};